<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>变更的函数</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="migration70.deprecated.html">« PHP 7.0.x 弃用的功能</a></li>
      <li style="float: right;"><a href="migration70.new-functions.html">新函数 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="migration70.html">从 PHP 5.6.x 移植到 PHP 7.0.x</a></li>
    <li>变更的函数</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="migration70.changed-functions" class="sect1">
 <h2 class="title">变更的函数</h2>
 
 <div class="sect2" id="migration70.changed-functions.core">
  <h3 class="title">PHP 核心</h3>
  
  
  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.debug-zval-dump.html" class="function">debug_zval_dump()</a></span> 现在打印 &quot;int&quot; 替代 &quot;long&quot;, 打印 &quot;float&quot; 替代 &quot;double&quot;
   </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.dirname.html" class="function">dirname()</a></span> 增加了可选的第二个参数,
     <code class="parameter">depth</code>, 获取当前目录向上
     <code class="parameter">depth</code> 级父目录的名称。
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.getrusage.html" class="function">getrusage()</a></span> 现在支持 Windows.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.mktime.html" class="function">mktime()</a></span> and <span class="function"><a href="function.gmmktime.html" class="function">gmmktime()</a></span> 函数不再接受
     <code class="parameter">is_dst</code> 参数。
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.preg-replace.html" class="function">preg_replace()</a></span> 函数不再支持
     &quot;\e&quot; (<strong><code>PREG_REPLACE_EVAL</code></strong>). 应当使用 <span class="function"><a href="function.preg-replace-callback.html" class="function">preg_replace_callback()</a></span>
     替代。
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.setlocale.html" class="function">setlocale()</a></span> 函数不再接受 <code class="parameter">category</code>
     传入字符串。 应当使用 <strong><code>LC_*</code></strong> 常量。
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.exec.html" class="function">exec()</a></span>, <span class="function"><a href="function.system.html" class="function">system()</a></span> and <span class="function"><a href="function.passthru.html" class="function">passthru()</a></span>
     函数对 NULL 增加了保护.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.shmop-open.html" class="function">shmop_open()</a></span> 现在返回一个资源而非一个int，
     这个资源可以传给<span class="function"><a href="function.shmop-size.html" class="function">shmop_size()</a></span>,
     <span class="function"><a href="function.shmop-write.html" class="function">shmop_write()</a></span>, <span class="function"><a href="function.shmop-read.html" class="function">shmop_read()</a></span>,
     <span class="function"><a href="function.shmop-close.html" class="function">shmop_close()</a></span> 和 <span class="function"><a href="function.shmop-delete.html" class="function">shmop_delete()</a></span>.
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.substr.html" class="function">substr()</a></span> 现在当 start 的值与 string 的长度相同时将返回一个空字符串。
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <span class="function"><a href="function.xml-parser-free.html" class="function">xml_parser_free()</a></span>不再足以释放解析器资源，如果它引用了一个对象，而这个对象又引用了那个解析器资源。在这种情况下，需要额外地取消设置 $parser。
    </span>
   </li>
  </ul>
 </div>
 
 

 
</div></div></div></body></html>